<%@ page language="java" isELIgnored="false" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<jsp:directive.include file="/WEB-INF/sitemesh-decorators/include.jsp"/>
<fmt:setBundle basename="bundles.student-resources"/>
<html>
<head>
<title>List <fmt:message key="student.title"/>s</title>
</head>
<body>
<div id="mainBody" >
	<div class="title"><security:authorize ifAllGranted="ROLE_ADMIN">Manage</security:authorize> <fmt:message key="student.title"/></div>
	<div id="search">
	    <div id="searchBox">
	        <form method="post" action="searchStudent.html">
	        	<input type="text" id="searchTerm" name="searchTerm" /><button id="goButton">GO</button>
	        </form>
	    </div>
	</div>
	<div class="navitem"><a class="button" href="${pageContext.request.contextPath}/newStudent"><span><img src="${pageContext.request.contextPath}/includes/images/icons/new.gif" /><fmt:message key="navigation.new"/> <fmt:message key="student.title"/></span></a></div>
	<div id="body">
  		<div id="table">
        	<div class="header">
        		<div>&nbsp;</div>
                <div>nNumber</div>
                <div>First Name</div>
                <div>Last Name</div>
                <div>Email</div>
                <div>Graduated</div>
                <div>Major</div>
            </div>
            <c:forEach items="${students}" var="student">
            <div class="row">
            	<div>
            		<a title="<fmt:message key="navigation.view" />" href="${pageContext.request.contextPath}/selectStudent?studentIdKey=${student.studentId}&"><img src="includes/images/icons/view.gif" /></a>
					<a title="<fmt:message key="navigation.edit" />" href="${pageContext.request.contextPath}/editStudent?studentIdKey=${student.studentId}&"><img src="includes/images/icons/edit.gif" /></a>
					<a title="<fmt:message key="navigation.delete" />" href="${pageContext.request.contextPath}/confirmDeleteStudent?studentIdKey=${student.studentId}&"><img src="includes/images/icons/delete.gif" /></a>
				</div>
            	<div>${ student.nnumber}</div>
                <div>${student.firstName }</div>
                <div>${student.lastName }</div>
                <div>${student.email }</div>
                <div>${student.graduated }</div>
                <div>${student.major }</div>
            </div>
            </c:forEach>
        </div>
    </div>
</div>
</body>
</html>